package com.fht.controller.inventory;


import com.fht.entity.MerchantsInformation;
import com.fht.service.food.MerchantsInformationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@Slf4j
@RequestMapping("/inventory/material")
public class InventoryMaterialController {


    @Autowired
    public MerchantsInformationService merchantsInformationService;


    //菜品类别展示
    @GetMapping("/index")
    public String index(Model model){

        List<MerchantsInformation> merchantsInformationList = merchantsInformationService.findAllIdAndName();
        model.addAttribute("merchantsInformationList",merchantsInformationList);

        return "inventory/inventoryMaterial/index";

    }

}
